package com.enroll.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.enroll.dao.SubjectDao;
import com.enroll.model.Subject;
import com.enroll.sevice.SubjectService;

@Service("subjectService")
public class SubjectServiceImpl implements SubjectService {

	@Autowired
	SubjectDao subjectDao;
	
	public void setSubjectDao(SubjectDao subjectDao) {
		this.subjectDao = subjectDao;
	}

	@Override
	public void save(Subject subject) {
		subjectDao.save(subject);
		
	}

	@Override
	public void update(Subject subject) {
		subjectDao.update(subject);
		
	}

	@Override
	public void delete(Subject subject) {
		subjectDao.delete(subject);
		
	}

	@Override
	public Subject findById(int id) {
		return subjectDao.findById(id);
	}

	@Override
	public List<Subject> findAll() {
		return subjectDao.findAll();
	}
	

}
